From b8963fe3bc2b9006a283279ca4078fc63a2d7f31 Mon Sep 17 00:00:00 2001 From: robertl Date: Thu, 6 Jan 2005 16:24:17 +0000 Subject: [PATCH] Don't leak on replacement. --- gpsbabel/util.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/gpsbabel/util.c b/gpsbabel/util.c index 11d3e8783..69f0d9370 100644 --- a/gpsbabel/util.c +++ b/gpsbabel/util.c @@ -658,7 +658,9 @@ gstrsub(const char *s, const char *search, const char *replace) char *o = xstrdup(s); while (strstr(o, search)) { + char *oo = o; o = strsub(o, search, replace); + xfree(oo); } return o; -- 2.30.2